<!doctype html>
<html>
<head>
</head>
<body>
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
?>

<!-- JavaScript -->
<script type="text/javascript" src="<?php echo base_url() ?>js/wufoo.js"></script>
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>css/form/form.css" media="screen, tv, projection" title="Default" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>css/chosen.css" media="screen, tv, projection" title="Default" />


<div id="container">
    <?php
    //Setting Awal Value Jika Prosedur yang dilakukan adalah prosedur input biasa.
    $value = array(
        'organisasi_id'          => "",
        'error'             => "",
        'legend'            => "Form Input Organisasi",
        'info'              => "Form entri data organisasi",
        'act_form'          => "organisasi/input_organisasi/",
        'organisasi_id'          => $organisasi_id,
        'organisasi_kode'       => "",
        'organisasi_nama'        => "",
        'organisasi_keterangan'  => "",
        'organisasi_id_parent'       => ""

    );
    
    //Setting Value pada form Jika melakukan prosedur Edit terhadap data tertentu.
    if($status == "edit"){
        foreach($organisasi as $row){
            $value['organisasi_id'] = $row->ORG_ID;
            $value['organisasi_kode'] = $row->ORG_KODE;
            $value['organisasi_nama'] = $row->ORG_NAMA;
            $value['organisasi_keterangan'] = $row->ORG_KETERANGAN;
        }
        $value['legend'] = "Form Edit Organisasi";
        $value['info'] = "Form Edit Data Organisasi";
        $value['act_form'] = "organisasi/edit_organisasi/".$value['organisasi_id'];
    }//end if
    
    ?>
    <?= form_open_multipart($value["act_form"],'class="wufoo" name="form_organisasi"'); ?>
    <fieldset class="fieldset">
    <legend class="legend">
        <?= $value["legend"] ?> |
    </legend>
    
    <div class="info">
        <div><?= $value["info"] ?></div>
    </div>
    <div>
        <?= anchor(site_url('organisasi'),img(array('src'=>'images/main/38.png','border'=>'0','alt'=>'')).'Kembali ke daftar organisasi','Menampilkan halaman Daftar Organisasi'); ?>
    </div>
  

 <!-- Konten -------------------------------------------------------------------------->
 <div id="contentform">
    <ul>

        <li>
            <label class="desc">KODE ORGANISASI *</label>
            <div>
                <input type="text" name="organisasi_kode" class="new field" value="<?php if($value['organisasi_kode'] !='') {echo $value['organisasi_kode'];}else {echo '';}?>" required/>                         
            </div>
        </li>
        <?php echo form_error('organisasi_kode'); ?>

        <li>
            <label class="desc">NAMA ORGANISASI</label>
            <div>
                <input type="text" name="organisasi_nama" class="new field" value="<?php if( $value['organisasi_nama'] !='') {echo  $value['organisasi_nama'];}else {echo '';}?>" required/>                         
            </div>
        </li>
        <?php echo form_error('organisasi_nama'); ?>

        <li>
            <label class="desc">KETERANGAN </label>
            <div>
                <input type="text" name="organisasi_keterangan" class="new field" value="<?php if($value['organisasi_keterangan']!='') {echo $value['organisasi_keterangan'];}else {echo '';}?>" required/>                         
            </div>
        </li>
        <?php echo form_error('organisasi_keterangan'); ?>        
                
        <li class="buttons">
          
          <input id="submit" type="submit" value="Simpan" />
          <input id="reset" type="reset" value="Batal" />
        </li>
    </ul>
</div>
</fieldset>
<?= form_close(); ?>
</form>
</div><!--container-->
</body>
</html>